<?php
/*控制界面显示类*/
namespace app\admin\controller;
use app\index\controller\CheckAll;
use app\member\controller\db\Image;
use think\Controller;
use think\facade\Session;


class Index extends Controller
{
    public function index()
    {
        $image = new Image();
        //TODO 有待补充
        if(Session::get("login") == "admin"){
            $this->assign("title", "管理员|首页")
                ->assign("images",$image->selectAll());
            return $this->fetch('index');
        }else{
            $this->redirect("/login/0");
        }
    }

    public function exitLogin(){
        Session::delete("login");
        $this->redirect("/");
    }

}